package com.lei.chinese_herbal_medicine.Entity;

import java.io.Serializable;

public class ModelHerbLink implements Serializable {
    private String id;

    private String modelId;

    private String herbId;

    private Float accuracyRate;

    private static final long serialVersionUID = 1L;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    public String getModelId() {
        return modelId;
    }

    public void setModelId(String modelId) {
        this.modelId = modelId == null ? null : modelId.trim();
    }

    public String getHerbId() {
        return herbId;
    }

    public void setHerbId(String herbId) {
        this.herbId = herbId == null ? null : herbId.trim();
    }

    public Float getAccuracyRate() {
        return accuracyRate;
    }

    public void setAccuracyRate(Float accuracyRate) {
        this.accuracyRate = accuracyRate;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ModelHerbLink other = (ModelHerbLink) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getModelId() == null ? other.getModelId() == null : this.getModelId().equals(other.getModelId()))
            && (this.getHerbId() == null ? other.getHerbId() == null : this.getHerbId().equals(other.getHerbId()))
            && (this.getAccuracyRate() == null ? other.getAccuracyRate() == null : this.getAccuracyRate().equals(other.getAccuracyRate()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getModelId() == null) ? 0 : getModelId().hashCode());
        result = prime * result + ((getHerbId() == null) ? 0 : getHerbId().hashCode());
        result = prime * result + ((getAccuracyRate() == null) ? 0 : getAccuracyRate().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", modelId=").append(modelId);
        sb.append(", herbId=").append(herbId);
        sb.append(", accuracyRate=").append(accuracyRate);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
